<include file="public@header" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:url('Cate/stoneindex')}">石材类型</a></li>
            <li><a href="{:url('Cate/addStoneCate')}">{:lang('ADD_CATE')}</a></li>
        </ul>
        <div>
            <form  class="well form-search" action="{:url('Cate/stoneIndex')}" method="get">
                <label>{:lang('石材类型')}:
                    <input type="text" name="cate_name" placeholder="请输入石材类型"value="{:input('request.cate_name')}" class="form-control"> </label>
                <input type="submit" class="btn btn-primary" value="搜索" />
                <a class="btn btn-danger" href="{:url('Cate/stoneIndex')}">清空</a>
            </form>
        </div>
        <form action="{:url('Cate/listorders')}" method="post">
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th>{:lang('CATE_NAME')}</th>
                    <th>{:lang('CREAT_TIME')}</th>
                    <th>{:lang('SORT_ORDER')}</th>
                    <th>{:lang('IF_SHOW')}</th>
                    <th>{:lang('ACTIONS')}</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="results" item="cate">
                    <tr>
                        <td>{$cate.cate_name}</td>
                        <td><php>echo date('Y-m-d H:i:s', $cate['add_time'])</php></td>
                        <td>{$cate.sort_order}</td>
                        <td>
                            <if condition="$cate['if_show'] eq 1">
                                <font color="red">√</font>
                                <else />
                                <font color="red">╳</font>
                            </if>
                        </td>
                        <td>
                            <a href="{:url('Cate/editstonecate',array('id'=>$cate['id'],'mark'=>$cate['mark']))}">{:lang('EDIT')}</a>
                            |
                            <a href="{:url('Cate/delete',array('id'=>$cate['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                            |
                            <a class="js-ajax-delete" data-msg="确定更改显示状态吗？"
                               href="{:url('Cate/toggle',array('id'=>$cate['id'],'show'=>$cate['if_show']))}">{:lang('TOGGLE')}</a>
                            <!--|-->
                            <!--<a href="{:url('Cate/add',array('id'=>$cate['id'],'mark'=>$cate['mark']))}">{:lang('ADD_CHILD')}</a>-->
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
            <div class="pagination" style="margin-top: -10px">{$page}</div>
        </form>
    </div>
<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>

</body>
</html>